import numpy as np

arr = np.array([[1,2,3], [4,5,6],[7,8,9]])

print arr

print arr.cumsum()
print arr.cumsum(0)
print arr.cumsum(1)
print arr.cumsum(2)